package com.lineng.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lineng.pojo.User;
import com.lineng.pojo.UserExample;

public interface UserMapper {
	long countByExample(UserExample example);

	int deleteByExample(UserExample example);

	int deleteByPrimaryKey(String id);

	int insert(User record);

	int insertSelective(User record);

	List<User> selectByExample(UserExample example);

	User selectByPrimaryKey(String id);

	int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

	int updateByExample(@Param("record") User record, @Param("example") UserExample example);

	int updateByPrimaryKeySelective(User record);

	int updateByPrimaryKey(User record);

	// 校验用户
	User getUserByuserNameAndPassword(@Param("username") String username, @Param("password") String password);

	// 查询学生用户
	List<User> selectUserByPermission(String permission);

	// 查询用户
	User selectUserByUsername(String username);
}